import java.util.*;

import javax.swing.*;


public class view implements Observer {
	
	JPanel panel = new JPanel();
	JLabel label = new JLabel();
	
	public view(String title) { 
/*		super(title);
		
		verden = v;
		
		label.setIcon(new ImageIcon(""));
		label.setName("label");
		
		panel.setOpaque(false);
		panel.add( label );
		
		setContentPane( panel );

		setSize(new Dimension(500,500));
		setVisible(true);
		validate();
		repaint();*/
	}

	//metode til at opdaterer Viewet.
	public void update(Observable o, Object arg) {
		System.out.println("Oberserved");
		ArrayList<Figur> figurer = ((Verden)o).getFigur();
		if(figurer == null)
			return;
		System.out.println(figurer);
		for (Figur figur : figurer) {
//			System.out.println();
			System.out.println("x: " + figur.x + " y: " + figur.y);
		}
	}
}